package com.frank.oj.service.admin.problem;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.frank.model.dto.CompileDTO;
import com.frank.model.entity.problem.Problem;
import com.frank.model.entity.problem.ProblemCase;
import com.frank.oj.common.result.CommonResult;
import com.frank.oj.model.dto.ProblemDTO;

import java.util.List;

/**
 * @author frank
 * @Date 2024/4/2
 */
public interface AdminProblemService {
    IPage<Problem> getProblemList(Integer limit, Integer currentPage, String keyword, Integer auth, String oj);

    CommonResult<Problem> getProblemById(Long pid);

    CommonResult<List<ProblemCase>> getProblemCases(Long pid, Boolean isUpload);

    CommonResult<Void> addProblem(ProblemDTO problemDTO);

    CommonResult<Void> importRemoteOJProblem(String name, String problemId);

    CommonResult<Void> updateProblem(ProblemDTO problemDTO);

    CommonResult<Void> deleteProblem(Long pid);

    CommonResult<Void> changeProblemAuth(Problem problem);

    CommonResult compileSpj(CompileDTO compileDTO);

    CommonResult compileInteractive(CompileDTO compileDTO);

    CommonResult<Void> deleteProblems(List<Long> pids);
}
